#include "multi_line_lidar.h"

void Multi_line_lidar::setModel(string _model)
{
    model=_model;
}

void Multi_line_lidar::setChannels(int _channels)
{
    channels=_channels;
}

void Multi_line_lidar::setTest_range(int _tes_range)
{
    test_range=_tes_range;
}

void Multi_line_lidar::setPower_consumption(int _power_consumption)
{
    power_consumption=_power_consumption;
}


void Multi_line_lidar::print ()
{
    cout<< "多线激光雷达"<<endl<<"a.型号："<< model<<endl<< "b.通道数："<< channels
    <<endl<< "c.测试范围："<< test_range<<endl<< "d.功耗："<< power_consumption<<endl;
}


void Multi_line_lidar::save (string path)
{
    ofstream ofs;// 创建流对象
    ofs.open(path, ios::out | ios::app);

    ofs<< "多线激光雷达"<<endl<<"a型号："<< model<<endl<< "b.通道数："<< channels
    <<endl<< "c.测试范围："<< test_range<<endl<< "d.功耗："<< power_consumption<<endl;

    ofs.close();
}
